package com.jdd.modules.parking.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jdd.modules.parking.entity.ParkCarOutLog;
import com.jdd.modules.parking.vo.MontiorSearchRespVo;
import com.jdd.modules.parking.vo.MontiorSearchVo;

/**
 * @Description: 车辆车场信息
 * @Author: jdd
 * @Date: 2021-02-20
 * @Version: V1.0
 */
public interface IparkCarOutLogService extends IService<ParkCarOutLog> {
    /**
     * 监控页面的出场日志
     *
     * @param montiorSearchVo
     * @param pageNo
     * @param pageSize
     * @return
     * @throws Exception
     */
    Page<MontiorSearchRespVo> monitorList(MontiorSearchVo montiorSearchVo, Integer pageNo, Integer pageSize) throws Exception;

    /**
     * 监控页面的停车日志
     *
     * @param montiorSearchVo
     * @param pageNo
     * @param pageSize
     * @return
     * @throws Exception
     */
    Page<MontiorSearchRespVo> monitorParkList(MontiorSearchVo montiorSearchVo, Integer pageNo, Integer pageSize) throws Exception;

    /**
     * 无牌车出场放入缓存
     *
     * @param parkCode
     * @param serialNo
     */
    void sendUnlicensedCarOut(String parkCode, String serialNo);

    /**
     * 获取最后一个出场记录
     *
     * @param parkCode
     * @return
     */
    ParkCarOutLog getLastParkOutEnterLog(String parkCode);

    /**
     * 根据入场ID 查询出场记录
     *
     * @param enterId 入场ID
     * @return 出场记录
     */
    ParkCarOutLog getParkOutEnterLogByEnterId(String enterId);


    void updateSynchronousStatus(String id, String synchronousStatus);
}
